﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"
           xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="update">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="commands">
                    <xs:complexType>
                        <xs:choice minOccurs="0" maxOccurs="unbounded">
                            <xs:element name="add-file">
                                <xs:complexType>
                                    <xs:attribute name="name" type="xs:string" use="required" />
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="delete-file">
                                <xs:complexType>
                                    <xs:attribute name="name" type="xs:string" use="required" />
                                </xs:complexType>
                            </xs:element>
                            <xs:element name="vcdiff-patch-file">
                                <xs:complexType>
                                    <xs:attribute name="name" type="xs:string" use="required" />
                                    <xs:attribute name="source-sha1" type="xs:string" use="required" />
                                    <xs:attribute name="target-sha1" type="xs:string" use="required" />
                                </xs:complexType>
                            </xs:element>
                        </xs:choice>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
            <xs:attribute name="version-from" type="xs:string" use="required" />
            <xs:attribute name="version-to" type="xs:string" use="required" />
        </xs:complexType>
    </xs:element>
</xs:schema>